<?php echo $this->render('user/head.phtml');
Zend_Session::start();
$session = new Zend_Session_Namespace('account');
?>
<div class="left margin-10px prompt">
  <h2>担心课程质量？先冲10块钱试试看。<br/>购买24小时内，对课程不满意，无条件退款。</h2>
</div>
<div class="clear"></div>

<form name="form_select_how_much_to_pay" method="post" target="blank" action="/order/make-order">
  <div class="left">
    <input type="hidden" name="uid" value='<?php echo $session->user->get("id");?>'/>
    <input type="hidden" name="username" value='<?php echo $session->user->get("username");?>'/>
    <select name="amount" size="1">
      <?php echo make_options(array("1"=>"1元", "10"=>"10元","20"=>"20元", "50"=>"50元", "100"=>"100元"), "1");?>
    </select>
    <input type="hidden" name="status" value="0"/>
  </div>
  <div class="left">
    <input class="alipay_submit" type="submit" value="支付宝充值"/>
  </div>
</form>

<div class="clear"></div>
<table cellspacing="0" cellpadding="0" class="resultTable">
  <tr>
    <th>订单号</td> 
    <th>充值金额</td> 
    <th>状态</td> 
    <th>时间</th>
    <th>支付宝交易号</th>
    <th>付款支付宝账户</th>
  </tr>
  <?php $i=1; foreach ($this->orders as $order){ ?>
  <tr class="<?php echo ($i++)%2 ? "" : "bg2";?>">
    <td class="td_order_id"><?php echo $order->get("id"); ?></td> 
    <td class="td_order_amount"><span class="order_amount"><?php printf("%.2f", $order->get("amount")); ?></span>元</td> 
    <td class="td_order_status"><?php if ($order->get("status")){ echo "完成支付";}else{echo "未完成支付";} ?></td> 
    <td class="td_order_time"><?php echo $order->get("time"); ?></td>
    <td class="td_order_status"><?php echo $order->get("alipay_trade_no"); ?></td> 
    <td class="td_order_status"><?php echo $order->get("buyer_email"); ?></td> 
  </tr>
  <?php } ?>
</table>

<?php echo $this->paginationControl($this->orders, 'Sliding', 'courses/pagelist.phtml');?>
<?php echo $this->render('user/foot.phtml');?>
